
<form name="form" method="post" action="{[$root]}{[$deleteLink]}{[$p1]}{[$p3]}">
<table>
	<tr align="center">
		<th width="40"><input type="checkbox" class="check" name="chkall" value="on" onclick="chkbox(this.form)"></th>
		<th width="40">序号</th>
		<th>采购单</th>
		<th>流水号</th>
		
		<th>供应商</th>
		<th>产品</th>
		<th width="40"></th>

		<th>名称</th>
		<th>规格</th>
		<th>数量</th>
		<th>单位</th>
		<th>单价</th>
		<th>金额</th>
		<th>备注</th>

		<th>采购员</th>
		<th>录入员</th>
		<th>状态</th>
		<th>{[$orderby]}</th>
	</tr>
	{[foreach name=outer key=key item=item from=$result]} 
	{[assign var="no" value="`$key+$pager->from+1`"]}
	{[assign var="t1" value="`$t1+$item.amount2`"]}
	{[assign var="t2" value="`$t2+$item.total`"]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td><input type="checkbox" class="check" name="c_{[$item.status]}_{[$item.id]}_{[$item.purchase]}" value="{[$item.id]}"></td>
		<td>{[$no]} {[if $item.visible eq 2]}N{[/if]} </td>
		<td><a href="javascript:void(0)"
			onclick="Common.dialog_view_('material.php?do=Purchase.view&id={[$item.purchase]}', '查看信息', '800x500')">{[$item.purchase]}</a></td>
		<td><a href="javascript:void(0)"
			onclick="Common.dialog_view_('{[$root]}{[$viewLink]}&id={[$item.id]}', '查看信息', '650x420')">{[$item.id]}</a></td>
		
		<td><a href="javascript:void(0)"
			onclick="Common.supplier({[$item.supplier]})">{[$item.supplier_t]}</a></td>
		<td><a href="javascript:void(0)" onclick="mold({[$item.mold]})">{[$item.mold_t]}</a></td>
		<td><a href="javascript:void(0)"
			onclick="RecordIn.popup(event, '{[$p2]}&p={[$p]}', {[$item.id]}, {[$item.status]})">[管理]</a></td>

		<td><a href="javascript:void(0)" onclick="Common.material({[$item.material]})">{[$item.name|truncate:27:"...":true]}</a></td>
		<td>{[$item.standard|truncate:21:"...":true]}</td>
		<td>{[$item.amount2|string_float]}</td>
		<td>{[$item.unit2]}</td>
		<td>{[$item.price2|string_price]}</td>

		<td>{[$item.total|money]}</td>
		<td>{[$item.content|truncate:21:"...":true]}</td>

		<td><a href="javascript:void(0)" onclick="emp({[$item.emp]})">{[$item.emp_t]}</a></td>
		<td><a href="javascript:void(0)" onclick="emp('{[$item.oper]}')">{[$item.oper_t]}</a></td>
		<td>{[$item.status_t]}</td>
		<td>{[$item.orderby_x]}</td>

	</tr>
	{[/foreach]}
	<tr align="center">
		<td><a href="javascript:void(0)" onclick="RecordIn.popup_all(event, '{[$p2]}&p={[$p]}')">[管理]</a></td>
		<td colspan="8"></td>		
		<td>{[$t1]}</td>
		<td colspan="2"></td>
		<td>{[$t2|money]}</td>
		<td colspan="5"></td>
	</tr>
</table>
</form>

{[include file="footer.tpl"]}
